/*
 ============================================================================
 Name		: Flashbox4ProMainContainer.h
 Author	  : HeQun
 Version	 : 1.0
 Copyright   : 
 Description : CFlashbox4ProMainContainer declaration
 ============================================================================
 */

#ifndef FLASHBOX4PROMAINCONTAINER_H
#define FLASHBOX4PROMAINCONTAINER_H

// INCLUDES
#include <coecntrl.h>
#include "fbtabgrouptop.h"
#include "FbContentWindow.h"
#include "FbSoftKeyBar.h"
#include "ConstDefined.hrh"
#include "FbInformation.h"

// CLASS DECLARATION

/**
 *  CFlashbox4ProMainContainer
 * 
 */
class CFlashbox4ProMainContainer : public CCoeControl,
		MListObserver,
		MSoftKeyObserver
{
public:
	// Constructors and destructor

	/**
	 * Destructor.
	 */
	virtual ~CFlashbox4ProMainContainer();

	/**
	 * ConstructL
	 * 2nd phase constructor.
	 * Perform the second phase construction of a
	 * CFlashbox4AppView object.
	 * @param aRect The rectangle this view will be drawn to.
	 */
	void ConstructL (const TRect& aRect ,TUid aLastViewID, TInt aActiveTabIndex);

public:
	// Functions from base classes

	/**
	 * From CCoeControl, Draw
	 * Draw this CFlashbox4AppView to the screen.
	 * @param aRect the rectangle of this view that needs updating
	 */
	void Draw (const TRect& aRect ) const;

	/**
	 * From CoeControl, SizeChanged.
	 * Called by framework when the view size is changed.
	 */
	virtual void SizeChanged ();

	/**
	 * From CoeControl,CountComponentControls.
	 */
	TInt CountComponentControls () const;

	/**
	 * From CCoeControl,ComponentControl.
	 */
	CCoeControl* ComponentControl (TInt aIndex ) const;

	/**
	 * From CoeControl,
	 * 按键事件接收处理
	 */
	TKeyResponse OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType );

	
protected:
	/**
	 * 派生自SoftKeyBar
	 */
	void SoftKeyEvent (TInt aKeyId );

	/**
	 * 初始化Tabgroup
	 */
	void InitializeTabGroupL ();

	/**
	 * from MListObserver
	 * pHandle 发出消息的对象
	 * aItemIndex:激活的item 序号
	 * aEventType:事件类型
	 */
	void ListItemEvent (CFbList *pHandle, TInt aItemIndex,TInt aItemId, TInt aEventType );

	//Active Item!
	void SetActiveTab ();

private:
/*	CFbTabgroupTop *m_pTopTabgroup;
	CFbContentWindow *m_pContentWindow;
*/
	CFbList *m_pOptionList;//选项菜单列表
	CFbInformation *m_pOptInfo;//帮助或关于页面信息
	
	CFbsBitmap *m_pAppLogo1Img;//Flashbox small logo!
//	CFbsBitmap *m_pTopTabbarImg;
	CFbsBitmap *m_pItembackfocusImg;
	CFbsBitmap *m_pItembackImg;

	CFbsBitmap* m_pTabArrayImg[KFbTabitemsCount];
	CFbsBitmap* m_pTabArrayMaskImg[KFbTabitemsCount];

	//激活的tab序号
	TInt 					m_activeTabIndex;

	TRect m_ActiveRect;
	TRect m_UnActiveRect[KFbTabitemsCount-1];
	TRect m_TabIconRect[KFbTabitemsCount-1];
	
	//Text Part!
	HBufC* m_Title;
	HBufC* m_TabName;
	
	//软键区
	CFbSoftKeyBar *m_pSoftKeyBar;

	void InitialOption();
/*	enum EOption_Item
	{
		EOpt_browser = 0,
		EOpt_update,
		EOpt_help,
		EOpt_about,
		EOpt_setting,		
		EOpt_cancel,
	};*/

	
};

#endif // FLASHBOX4PROMAINCONTAINER_H
// End of File
